from openai import OpenAI
from langchain.chains import LLMChain
from langchain_core.prompts import ChatPromptTemplate, PromptTemplate
from langchain_openai import ChatOpenAI
import os
os.environ["DEEPSEEK_API_KEY"] = "sk-836efddede27418c9526248a5edad5c2"

client = OpenAI(
    api_key='hk-mtiquv1000041663a49a34520ad3294132cbce7abf1c2ef3',
    base_url="https://api.openai-hk.com/v1"
)
template = "请简要描述机器学习。"

prompt_template = PromptTemplate.from_template(template)
# llm_chain = LLMChain(llm = client,prompt_template=prompt_template)
llm_chain = prompt_template | client

